package yxy.game.pm2.module.arena;

import org.joda.time.DateTime;
import yxy.apple.logger.Logger;
import yxy.game.pm2.bean.timeline.JobHandle;

//测试用
public class ArenaCrondTestJob extends JobHandle {
	protected static Logger logger = Logger.create(ArenaCrondTestJob.class);

	@Override
	public void init() {
		handle();
	}

	@Override
	public void tick() {
		handle();
	}

	@Override
	public int jobType() {
		return JobHandle.JOB_TYPE_CROND;
	}

	@Override
	public long period() {
		return 10;
	}

	@Override
	public String crond() {
		return "0 */1 * * * ?";
	}

	private void handle() {
		try {
			logger.info("ArenaCrondTestJob : " + DateTime.now().toString("yyyy-MM-dd HH:mm:ss"));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
